package com.ruleengine.task.condition;

import com.ruleengine.task.condition.impl.DefaultCondition;


public class ConditionFactory {
    private static ConditionFactory factory;
    private ConditionFactory(){}
    
    public static ConditionFactory getInstance(){
        if(factory==null){
            factory = new ConditionFactory();
        }
        return factory;
    }

    
    /**根据类型创建初始化一个条件表达式对象
     * @param type 条件表达式类型
     * @return 条件表达式对象
     */
    public ICondition createCondition(String express){
            return new DefaultCondition(express);
    }
}
